;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Project NoName Patch Initialization File
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
var,debug_camera,false				;Disable debug camera
var,debug_input,false				;Disable input display
var,debug_csskip,false				;Disable cutscene skip
var,debug_cscontrol,false			;Disable cutscene control
var,debug_item,true					;Enable debug inventory
var,debug_mapselect,true			;Enable map select
var,debug_noclip,true				;Enable noclip
var,ram_viewer,false				;Disable RAM Viewer (Apply the ram_viewer texture pack when enabling this feature)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Data Setup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Player
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
var,max_hearts,			16

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Wallet capacities
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
var,small_wallet,		200
var,medium_wallet,		500
var,big_wallet,			1000
var,giant_wallet,		2000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Offsets
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
var,custom_code_ROM,	0x03FEDFD0
var,custom_code_RAM,	0x80500000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Set up variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
var,dma,0x12F70

var,code,					[{dma}+0x10*28]
var,code_conv,				{code}-0x8001CE60

var,ovl_opening,			[{dma}+0x10*31]
var,ovl_opening_conv,		{ovl_opening}-0x80400D30

var,ovl_file_choose,		[{dma}+0x10*32]
var,ovl_file_choose_conv,	{ovl_file_choose}-0x803F13A0

var,ovl_kaleido_scope,		[{dma}+0x10*33]
var,ovl_kaleido_scope_conv,	{ovl_kaleido_scope}-0x803D23B0

var,ovl_player_actor,		[{dma}+0x10*34]
var,ovl_player_actor_conv,	{ovl_player_actor}-0x803D23B0

var,ovl_en_mag,				[{dma}+0x10*362]
var,ovl_en_mag_conv,		{ovl_en_mag}-0x8023A300

var,spot00_scene,			[{dma}+0x10*1013]
var,spot00_scene_conv,		{spot00_scene}-0x803A3FB0

var,nakaniwa_scene,			[{dma}+0x10*1406]
var,nakaniwa_scene_conv,	{nakaniwa_scene}-0x803CA7B0

var,custom,					0x03FEDFD0
var,custom_conv,			{custom}-0x80500000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Set up offsets for the gameshark patch files so that they're
;automatically converted to ROM addresses.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dir,codes/					;Set the default directory for ofs & dis commands
;Equipment Screen & System patches
ofs,equipment_kaleido,		{ovl_kaleido_scope_conv}	;Works
ofs,equipment_code,			{code_conv}					;Works
ofs,equipment_player,		{ovl_player_actor_conv}		;Works
;Inventory Screen
ofs,inventory_kaleido,		{ovl_kaleido_scope_conv}	;Partially
;File Select
ofs,file_select_choose,		{ovl_file_choose_conv}		;Works
ofs,file_select_code,		{code_conv}					;Works
Interface
ofs,interface_code,			{code_conv}					;Works
;Title Screen
ofs,title_screen_code,		{code_conv}					;Works
ofs,title_screen_opening,	{ovl_opening_conv}			;Works
ofs,title_screen_scene,		{nakaniwa_scene_conv}		;Works
;Custom Code Transfer
ofs,custom_code,			{code_conv}					;Works
;Action Engine
ofs,action_engine_player,	{ovl_player_actor_conv}		;Works
ofs,action_engine_custom,	{custom_conv}				;Works
;Debug
ofs,ram_test,				{ovl_kaleido_scope_conv}	;Works
ofs,inventory_debug,		{ovl_kaleido_scope_conv}	;Doesn't work
;Offset relocator nullifier
ofs,relocator_code,			{code_conv}					;?
ofs,relocator_custom,		{custom_conv}				;?

ofs,_player,				0x01014000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Disable gameshark files that doesn't work on console
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dis,inventory_debug

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Disable others
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
con,skip,!{ram_viewer}
	dis,ram_test			;Do not apply the ram_test patch if the ram viewer is disabled.
endcon,skip